<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		
		<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<link rel="stylesheet" type="text/css" href="common/iconfont/iconfont.css" />
		<link rel="stylesheet" type="text/css" href="common/css/loading.css"/>
		<script src="common/js/av-min-2.1.2.js" type="text/javascript" charset="utf-8"></script>
		<script src="common/js/base.js" type="text/javascript" charset="utf-8"></script>
		<script src="common/js/vue.js" type="text/javascript" charset="utf-8"></script>
		<style type="text/css">
			* {
				padding: 0px;
				margin: 0px;
			}
			
			body {
				display: -webkit-box;
				-webkit-box-orient: vertical;
				font-family: "微软雅黑";
			}
			
			.header {
				height: 45px;
				line-height: 45px;
				background: #f9f9f9;
				color: #616161;
				font-size: 18px;
				border-bottom: 1px solid #bbb;
				text-align: center;
			}
			
			.header .icon {
				width: 20px;
				position: absolute;
				left: 10px;
			}
			
			.itemlist {
				display: -webkit-box;
				background-color: white;
				-webkit-box-orient: vertical;
			}
			
			.item {
				display: -webkit-box;
				margin-top: 5px;
				-webkit-box-orient: vertical;
				border-bottom: 1px solid gainsboro;
				padding-bottom: 10px;
			}
			
			.item .userInfo {
				display: -webkit-box;
				-webkit-box-pack: center;
				-webkit-box-align: center;
				font-size: 16px;
				color: #232326;
			}
			
			.item .userName {
				display: -webkit-box;
				margin-left: 20px;
			}
			
			.item .userPhone {
				display: -webkit-box;
				-webkit-box-flex: 1;
				margin-left: 10px;
			}
			
			.item .area {
				margin: 2px 0 0 15px;
				font-size: 13px;
				color: #686868;
			}
			
			.item .address {
				display: -webkit-box;
				word-break: break-word;
				text-overflow: ellipsis;
				overflow: hidden;
				-webkit-box-orient: vertical;
				-webkit-line-clamp: 2;
				margin: 3px 5px 0 15px;
				font-size: 13px;
				color: #686868;
			}
			
			.btn span {
				display: -webkit-box;
				height: 20px;
				border-radius: 4px;
				line-height: 20px;
				font-size: 13px;
				color: #232326;
				margin-right: 10px;
				padding-left: 15px;
				padding-right: 15px;
				overflow: hidden;
				text-overflow: ellipsis;
				white-space: nowrap;
				box-sizing: border-box;
				text-align: center;
				border: 1px solid #f23030;
				color: #f23030;
			}
			
			.btn {
				display: -webkit-box;
				-webkit-box-align: center;
				margin: 5px 0;
				-webkit-box-pack: end;
			}
			
			.btnAdd {
				display: -webkit-box;
				-webkit-box-pack: center;
				position: fixed;
				bottom: 0;
				left: 0;
				width: 100%;
				height: 60px;
			}
			
			.btnAdd .addbtn {
				display: -webkit-box;
				-webkit-box-pack: center;
				-webkit-box-align: center;
				width: 200px;
				height: 40px;
				background-color: #F23030;
				font-size: 16px;
				color: white;
				border-radius: 4px;
			}
		</style>
	</head>
	<body>
		<div class="csshub-loading" v-if="isLoading">
			<span></span>
			<span></span>
			<span></span>
			<span></span>
		</div>
		<div v-if="!isLoading">
			<div class="header">
				<i class="icon Hui-iconfont" @click="my">&#xe6d4;</i>收货地址管理
			</div>
			<div class="itemlist">
				<div class="item" v-for="item in defaultAddress">
					<div class="userInfo">
						<div class="userName" v-html="item.attributes.username"></div>
						<div class="userPhone" v-html="item.attributes.phone"></div>
					</div>
					<div class="area" v-html="item.attributes.area">
					</div>
					<div class="address" v-html="item.attributes.address">
					</div>
					<div class="btn">
						<span>默认地址</span>
					</div>
				</div>
				<div class="item" v-for="item in normalAddress">
					<div class="userInfo">
						<div class="userName" v-html="item.attributes.username"></div>
						<div class="userPhone" v-html="item.attributes.phone"></div>
					</div>
					<div class="area" v-html="item.attributes.area">
					</div>
					<div class="address" v-html="item.attributes.address">
					</div>
					<div class="btn">
						<span @click="resetDefault($index)">设为默认</span>
					</div>
				</div>
				<div class="btnAdd">
					<div class="addbtn" @click="add">添加收货地址</div>
				</div>
			</div>
		</div>
		<script src="common/js/jquery-2.1.4.js" type="text/javascript" charset="utf-8"></script>
		<script src="common/js/fastclick.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			$(function() {
				FastClick.attach(document.body);
			});
		</script>
		<script src="vue/addressVue.js" type="text/javascript" charset="utf-8"></script>
	</body>

</html>